<!DOCTYPE html>
<html><head>

    <style>
        html,
        body {
            height: 100%;
            overflow: hidden;
        }

        body {
            background-color: #222;
            color: #fff;
            background-image: url();
            background-repeat: repeat;
            font-family: Helvetica;
            margin: 0px;
        }

        a {
            position: relative;
            top: 200px;
            color: #fff;
        }

        .slide {
            height: 100%;
            width: 100%;
            overflow: hidden;
            text-align: center;
            background: #3498db;
        }

        #one {
            background: #3498db;
        }

        #two {
            background: #e74c3c;
        }

        #three {
            background: #2ecc71;
        }

        /* Animate.css */
        .animated {
            -webkit-animation-duration: 1s;
            animation-duration: 1s;
            -webkit-animation-fill-mode: none;
            animation-fill-mode: none;
        }

        .animated.infinite {
            -webkit-animation-iteration-count: infinite;
            animation-iteration-count: infinite;
        }

        .animated.hinge {
            -webkit-animation-duration: 2s;
            animation-duration: 2s;
        }

        .animated.bounceIn,
        .animated.bounceOut {
            -webkit-animation-duration: .75s;
            animation-duration: .75s;
        }

        .animated.flipOutX,
        .animated.flipOutY {
            -webkit-animation-duration: .75s;
            animation-duration: .75s;
        }

        /* Animations */
        @-webkit-keyframes rollIn {
            0% {
                opacity: 0;
                -webkit-transform: translate3d(0,-100%, 0);
                transform: translate3d(0,-100%, 0) ;
            }
            100% {
                opacity: 1;
                -webkit-transform: none;
                transform: none;
            }
        }
        @keyframes rollIn {
            0% {
                opacity: 0;
                -webkit-transform: translate3d(0,-100%, 0);
                transform: translate3d(0,-100%, 0);
            }
            100% {
                opacity: 1;
                -webkit-transform: none;
                transform: none;
            }
        }
        .rollIn {
            -webkit-animation-name: rollIn;
            animation-name: rollIn;
        }
        @-webkit-keyframes rollOut {
            0% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                -webkit-transform: translate3d(-100%, 0, 0);
                transform: translate3d(-100%, 0, 0);
                height: 0px;
                width: 0px;
            }
        }
        @keyframes rollOut {
            0% {
                opacity: 1;
            }
            100% {
                opacity: 0;
                -webkit-transform: translate3d(-100%, 0, 0);
                transform: translate3d(-100%, 0, 0);
                height: 0px;
                width: 0px;
            }
        }
        .rollOut {
            -webkit-animation-name: rollOut;
            animation-name: rollOut;
        }

        .hide {
            display: none;
        }

        .show {
            display: block;
        }
    </style>
</head>
<body>

<div class="slide hide" id="3">
    <h1>Slide 3</h1>
    <!--<a href="#" data-slide="3">Go to Slide 3</a>-->
</div>
<div class="slide hide" id="2">
    <h1>Slide 2</h1>
    <a href="#" data-slide="3">Go to Slide 3</a>
</div>
<div class="slide show" id="1">
    <h1>Slide 1</h1>
    <a href="#" data-slide="2">Go to Slide 2</a>
</div>


<script src="../scripts/jquery/2.1.3/jquery.js"></script>
<script>
    var animationExit = "animated rollOut";
    var animationEnter = "animated rollIn";
    var animationEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";
    $('a').on('click', function(e) {
        var slide = $(this).attr('data-slide');
        if (slide) {
            e.preventDefault();
            var exitingElem = $(this).closest('div');
            $('#' + slide).attr('class', 'slide ' + animationEnter).one(animationEnd, function() {
                $(this).removeClass(animationEnter).addClass('show');
            });
            exitingElem.attr('class', 'slide ' + animationExit).one(animationEnd, function() {
                $(this).removeClass(animationExit).addClass('hide');
            });

        }
    });
</script>
</body>
</html>